package com.forum.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.forum.pojo.ForumComment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.forum.pojo.vo.ForumCommentVo;
import com.forum.pojo.vo.UserCommentVo;
import com.forum.result.Result;

import java.util.List;

/**
* @author 86152
* @description 针对表【forum_comment(评论)】的数据库操作Service
* @createDate 2023-01-31 00:42:33
*/
public interface ForumCommentService extends IService<ForumComment> {

    List loadComments(String articleId);

    void addComment(Long replyUserId, ForumCommentVo forumCommentVo, Long userId);

    Page<ForumComment> loadCommentsByPage(String articleId, Integer pageNo, Integer pageSize);

    Result getPersonComment(Long userId);

    Page<UserCommentVo> loadCommentsByUserName(String username, Integer pageNo, Integer pageSize);

    int setTop(Integer commentId, Integer type);

    boolean deleteByArticleId(Integer commentId);
}
